package com.example.peachgrove.controller.blog;

import com.example.peachgrove.dao.WorkClassMapper;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;
import java.util.HashMap;

@Api(tags = "前台文章分类")
@RestController
@RequestMapping("/blog/workClass")
@ResponseBody
public class BlogWorkClassController {

    @Autowired
    WorkClassMapper workClassMapper;

    @ApiOperation("查询所有分类列表")
    @GetMapping("/getAllWorkClass")
    @ApiImplicitParams({
    })
    public HashMap getAllWorkClass(){
        HashMap res = new HashMap<String,Object>();
        res.put("datas",workClassMapper.getAllWorkClass());
        return res;
    }

}
